﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<Blog.Models.Post>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    Listagem
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <h2>
        Listagem</h2>
    <p align="right">
        <%: Html.ActionLink("Adicione um novo Post", "Create") %>
    </p>
    <% foreach (var item in Model)
       { %>
    <h2>
        <%: Html.ActionLink(item.Title, "View", new { Id = item.PostId }) %>
    </h2>
    <p>
        <%: item.Body %>
    </p>
    <p>
        <%: Html.ActionLink("Editar", "Edit", new { Id = item.PostId }) %> | <%: Html.ActionLink("Remover", "Delete", new { Id = item.PostId }) %></p>
    <% } %>
</asp:Content>
